ADD_DEFINITIONS(-DOSGDB_LIBRARY)

#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_SHARED_LINKER_FLAGS  "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
SET(LIB_NAME rpcFw)
set(DEBUG_LIB HPSocket_D.lib)
set(RELEASE_LIB HPSocket.lib)

aux_source_directory(. SRC_DIR)
include_directories(../include)
include_directories(../include/rpcFw)
include_directories(../public_include)
link_directories(../public_lib)

file(GLOB_RECURSE FIND_RET *.h)
file(GLOB EXTERN_FILE ../include/rpcFw/*.h)

add_definitions(-DEXPORT_API)

ADD_LIBRARY(${LIB_NAME} SHARED
            ${FIND_RET}
            ${EXTERN_FILE}
            ${SRC_DIR}
        )

SET(LIBRARY_OUTPUT_PATH ../../bin)
target_link_libraries(${LIB_NAME} debug ${DEBUG_LIB})
target_link_libraries(${LIB_NAME} optimized ${RELEASE_LIB})